<nz-page-header nzTitle="auditFlow">
    <nz-breadcrumb nz-page-header-breadcrumb>
        <nz-breadcrumb-item>
            <a [routerLink]="['/']">首页</a>
        </nz-breadcrumb-item>
        <nz-breadcrumb-item>
            <a [routerLink]="['/auditManagement']"> {{ "auditManagement" | translate}}</a>
        </nz-breadcrumb-item>
    </nz-breadcrumb>
</nz-page-header>

<nz-card [nzExtra]="extraAction">
    <ng-template #extraAction>
        <button nz-button nzSize="large" class="mr-4" (click)="create()" nzType="primary">{{ 'add' | translate }}</button>
        <button nz-button nzSize="large" (click)="refresh()">{{'refresh' | translate}}</button>
    </ng-template>
    <nz-table #dataTable nzShowSizeChanger nzShowPagination [nzFrontPagination]="false" [nzData]="dataItems" [nzTotal]="pageingInfo.totalItems"
        [(nzPageSize)]="pageingInfo.pageSize" [(nzPageIndex)]="pageingInfo.pageNumber" [nzLoading]="pageingInfo.isTableLoading" (nzPageIndexChange)="refresh()"
        (nzPageSizeChange)="refresh()">
        <thead>
            <tr>
                <th>id</th>
                <th>auditName</th>
                <th>providerName</th>
                <th>providerKey</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let item of dataTable.data">
                <td>{{item.id}}</td>
                <td>{{item.auditName}}</td>
                <td>{{item.providerName}}</td>
                <td>{{item.providerKey}}</td>
                <td>
                    <button nz-button nzType="primary" nzSize="small" (click)="edit(item)">{{'edit' | translate}}</button>
                    <nz-divider nzType="vertical"></nz-divider>
                    <button nz-button nzType="danger" nzSize="small" nz-popconfirm [nzPopconfirmTitle]="'确定删除吗?'" (nzOnConfirm)="delete(item)"
                        nzPopconfirmPlacement="top">{{'delete' | translate}}</button>
                </td>
            </tr>
        </tbody>
    </nz-table>
</nz-card>